import sys, os, doctest, unittest

if sys.argv[1] == 'prepare':
	print os.popen('/home/buildbot/pybot/python-tool/prepare.sh').read()

if sys.argv[1] == 'pysqlite':
	import pysqlite2.test
	pysqlite2.test.test()

if sys.argv[1] == 'feedvalidator':
	sys.argv.remove('feedvalidator')
	sys.path = ['/home/buildbot/feedvalidator'] + sys.path
	import runtest
	suite = runtest.buildTestSuite()
	unittest.main(defaultTest = 'suite')

if sys.argv[1] == 'Genshi':
	sys.argv.remove('Genshi')
	sys.path = ['/home/buildbot/genshi'] + sys.path
	import genshi.tests
	unittest.main(module = genshi.tests, defaultTest = 'suite')

if sys.argv[1] == 'Trac':
	sys.argv.remove('Trac')
	sys.path = ['/home/buildbot/trac'] + sys.path
	import trac.test
	unittest.main(module = trac.test, defaultTest = 'suite')
